Computer systems and the corresponding methods for operating them are generally known. A computer system—or computer for short—features a processor or a corresponding processing unit which is in a position to execute commands in accordance with a defined command set and to initiate the actions corresponding to the commands in each case. Processors and processing units of the above type are referred to in general terms below as processors.
There are processors of the type defined above in various performance classes and with different instruction sets. Whereas each processor will provide commands in some form or another, for adding two numbers for example, the number of commands that are to be executed on a processor to perform such an addition, e.g. an addition of two so-called long numbers, varies widely. If a first processor can address these two long numbers directly and has the corresponding internal registers in which these two long numbers can be buffered, the addition can for example be implemented with one or two processor commands. For another processor the same function can require significantly more processor commands to be executed, e.g. if the addition of the long numbers has to be executed byte-by-byte or word-by-word, so that the addition has to be broken down into individual part additions and finally in a concluding step any possible carry over has to be taken into account. The addition is then performed more quickly—disregarding the clock frequency with which the processor is controlled—on that processor on which fewer processor commands are to be executed.
Software programs which include such additions for example and are to be run on the processor or executed by the processor are currently usually coded using what are known as high-level programming languages. A specific translation program, known as the compiler, takes care of the translation of the commands of the programming language into commands which the processor can execute directly. This makes it clear that a compiler has previously been tailored to the processor concerned on which the compiled program is subsequently to be run.
For compilers which create executable code for the widely used processors from Intel, e.g. processors of type 8088, 8086, 80186, 80286, 80386, 80486, Pentium, etc. it is often possible to select the processors for which the compiler is to create the executable code. If for example executable code for execution on a processor of type 80486 has been created with the compiler, this code also contains those processor commands which distinguish a processor of type 80486 from for example a processor of type 8086. The execution of code optimized in this way for a processor of type 80486 is thereby more efficient than if the compiler had created code for a processor of type 8086 and this code were to be run on a processor of type 80486. To this extent there exists what is known as upwards compatibility between the processors listed above, as can also be found for processors of other well-known processor families. However no downwards compatibility is provided so that a code which was created for a processor of type 80486 cannot be executed on a processor of type 8086, since this code also features processor commands that only a processor of type 80486 is in a position to execute.
A program which has been created can thus not simply be transferred from a first processor onto a second processor with a different range of functions. When the program is transferred to a processor with a smaller range of functions it is under some circumstances not possible to execute the program since the processor with the smaller range of functions cannot execute some instructions contained in the program. When the program is transferred to a processor with a larger range of functions execution of the program is generally safeguarded, however the disadvantage is that the additional performance of the processor cannot be exploited.
What are known as preprocessors are already known from software development, which prepare a source program, source code as an input for the compiler by essentially executing textual expansions or replacements. The preprocessor is a specific software program which is used before the compiler is used. The preprocessor is able to recognize specific elements in the source code on the basis of a unique syntax or on the basis of a unique format. The usual case is for example an application in which the programmer provides instructions in the source code which make it easier to find possible errors during development. In the final program however these instructions should no longer be present. To do this the programmer embeds the corresponding instructions in a pre-processor instructions provided for this purpose, such as #if DEBUG . . . #endif. The result of these is that after the source code has been processed by the preprocessor, the instructions contained between the markers #if and #endif are only still included if the symbol DEBUG was defined. The programmer can thus almost operate a switch by defining a symbol which affects the type and scope of the generated program.